package web.dropwizard.mapper;

import application.services.NoProjectException;

import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper;

/**
 * Created by ABEILLE on 27/11/2014.
 */
public class NoProjectExceptionMapper implements ExceptionMapper<NoProjectException> {

    @Override
    public Response toResponse(NoProjectException exception) {
        return Response.status(Response.Status.NOT_FOUND).entity(exception.getMessage()).build();
    }
}
